import { url } from '../../build/config'
import ajax from './ajax'

const base_url = url.base_url + '/api/qa-module';

export function moduleAdd(data) {
  return ajax({
    url: `${base_url}`,
    method: 'post',
    data: data,
    showMsg: true,
  })
}

export function moduleDelete(id) {
  return ajax({
    url: `${base_url}/${id}`,
    method: "delete",
    showMsg: true,
  })
}

export function moduleUpdate(data) {
  return ajax({
    url: `${base_url}`,
    method: 'put',
    data: data,
    showMsg: true,
  })
}

export function modulePage(data) {
  return ajax({
    url: `${base_url}/page`,
    method: 'post',
    data:data,
  })
}

export function moduleList() {
  return ajax({
    url: `${base_url}`,
    method: 'get',
  })
}
